<?php if ($request == 'main_page'):?>
<!-- <div class="row academy course"> -->
<script>
$(function() {
	$("#gallery img").live('click', function() {
		$(this).removeClass('active');
		$(this).next().addClass('active');

		if ($(this).index() + 1 == $(this).parent().children().size()) {
			$(this).siblings().eq(0).addClass('active');
		}
	});
});
</script>
	<div class="span12">
		<div class="inner-content" >
			<?php foreach ($course as $k => $v):?>
			<div class="span5 courses">
				<span class="detail-plus" data-toggle="modal" href="#course_modal" id="<?php echo $v['id']?>">+</span>
				<div class="title"><?php echo $v['name']?></div>
				<div class="sub_title"><?php echo $v['sub_title']?></div>
				<div class="content"><?php echo $v['content']?></div>
			</div>
			<?php endforeach;?>
		</div>
	</div>
	
	<div class="modal hide presentation" id="course_modal"></div>
<!-- </div> -->
<?php elseif ($request == 'sub_page'):?>
<script>
$(function() {

	<?php if ($this->common->_is_admin()):?>
	post_option['course_id'] = <?php echo $course['id']?>;
	<?php endif;?>
	
});
</script>
	<div id="gallery">
		<?php if ($pic):?>
		<?php foreach ($pic as $k => $v):?>
		<img src="<?php echo $v['photo_path']?>" class="<?php if ($k == 0):?>active<?php endif;?>">
		<?php endforeach;?>
		<?php endif;?>
	</div>
	<div id="intro">
    	<div class="modal-close" data-dismiss="modal">x</div>
    	<div class="name">
    		<div class="title"><?php echo $course['name']?></div>
    		<div class="sub_title"><?php echo $course['sub_title']?></div>
    		<div class="teacher">主讲/<?php echo $course['teacher']?></div>
    	</div>
    	<div class="content">
    		<div>课程目的</div>
    		<?php echo $course['content']?>
    	</div>
    </div>
<?php endif;?>